import Vue from 'vue'
import VueRouter from 'vue-router'
import TabPane from "@/components/TabPane.vue";

Vue.use(VueRouter)

const routes = [{
    path: '/', name: 'TabPane', component: TabPane, meta: {title: '伪数据生成引擎'},

},

]

const router = new VueRouter({
    routes
})

// 增加路由前置守卫放行路由标题
router.beforeEach((to, from, next) => {
    if (to.meta.title) {
        document.title = to.meta.title;
    }
    next();
});


export default router
